fix(parallel): correct active state pulsing and duration display for parallel subflow blocks#3305
Merged
waleedlatif1 merged 5 commits intostagingfrom Feb 22, 2026
Merged
fix(parallel): correct active state pulsing and duration display for parallel subflow blocks#3305waleedlatif1 merged 5 commits intostagingfrom
waleedlatif1 merged 5 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR fixes two visual bugs with parallel subflow blocks during workflow execution:
Key observations:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Executor as BlockExecutor
participant SSE as SSE Stream
participant Hook as useWorkflowExecution
participant RefCount as activeBlockRefCounts
participant UI as Canvas UI
Note over Executor: Parallel block A runs in 3 branches<br/>(A__branch-0, A__branch-1, A__branch-2)
Executor->>SSE: block:started (blockId: A)<br/>via originalBlockId
SSE->>Hook: event block:started A
Hook->>RefCount: refCount[A] = 0 → 1
Hook->>UI: activeBlocks.add(A) → pulse ON
Executor->>SSE: block:started (blockId: A)
SSE->>Hook: event block:started A
Hook->>RefCount: refCount[A] = 1 → 2
Executor->>SSE: block:started (blockId: A)
SSE->>Hook: event block:started A
Hook->>RefCount: refCount[A] = 2 → 3
Executor->>SSE: block:completed (blockId: A)
SSE->>Hook: event block:completed A
Hook->>RefCount: refCount[A] = 3 → 2
Note over UI: Still pulsing (count > 0)
Executor->>SSE: block:completed (blockId: A)
SSE->>Hook: event block:completed A
Hook->>RefCount: refCount[A] = 2 → 1
Executor->>SSE: block:completed (blockId: A)
SSE->>Hook: event block:completed A
Hook->>RefCount: refCount[A] = 1 → 0
Hook->>UI: activeBlocks.delete(A) → pulse OFF
Last reviewed commit: 04fbe1d |
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts
Outdated
Show resolved
Hide resolved
Collaborator
Author
|
Addressed in 6b407ee — extracted |
Collaborator
Author
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts
Show resolved
Hide resolved
…s masking failure
Collaborator
Author
|
@cursor review |
…h success masking failure" This reverts commit 9c087cd.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
node.metadata.originalBlockId) instead of the branch-suffixed ID, and ref counting ensures the block stays active until all branches completemax(endedAt) - min(startedAt)for parallel subflow and iteration nodes; loop subflows retain the serial sumType of Change
Testing
Tested manually
Checklist